package com.huadi.cmcc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName order
 */
//指定的数据库表order
@TableName(value ="`order`")
//自动生成getters and setters
@Data
public class Order implements Serializable {
    /**
     * 
     */
    //数据库自增id
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long userid;
    /**
     * 用户名
     */
//    当前属性不是数据库的字段，但在项目中必须使用
    @TableField(exist = false)
    private String username;
    /**
     * 
     */
    private Long packageid;
    @TableField(exist = false)
    private String packageName;
    @TableField(exist = false)
    private String packageType;
    @TableField(exist = false)
    private BigDecimal price;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date time;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}